<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <button>点击</button>
  <script>
    const btn = document.querySelector('button')
    // 添加点击事件

    function fn() {
      console.log(11);
      btn.removeEventListener('click',fn) // 解绑事件,要求,事件类型和回调函数要同名
    }
    btn.addEventListener('click', fn);


  </script>
</body>

</html>